package hjw.com.entity;

import java.util.Date;

/**
 * <p>Project:Academic - Comment
 *
 * @author IvanWei玮 -- maste
 * @version 1.0
 * @DataTime 2025/2/13 16:19
 * @since 1.8
 */
public class Comment {
    private int id;
    private int uid;
    private Book book;
    private double rate;
    private String content;
    private String nickname;
    private String img;
    private Date tpost;

    public Comment() {
        this.id = 0;
        this.uid = 0;
        this.book = new Book();
        this.rate = 0.0;
        this.content = "";
        this.nickname = "";
        this.img = "";
        this.tpost = new Date();
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getUid() {
        return uid;
    }

    public void setUid(int uid) {
        this.uid = uid;
    }

    public Book getBook() {
        return book;
    }

    public void setBook(Book book) {
        this.book = book;
    }

    public double getRate() {
        return rate;
    }

    public void setRate(double rate) {
        this.rate = rate;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    public Date getTpost() {
        return tpost;
    }

    public void setTpost(Date tpost) {
        this.tpost = tpost;
    }

    @Override
    public String toString() {
        return "Comment{" +
                "id=" + id +
                ", uid=" + uid +
                ", bId=" + book +
                ", rate=" + rate +
                ", content='" + content + '\'' +
                ", nickname='" + nickname + '\'' +
                ", img='" + img + '\'' +
                ", tpost=" + tpost +
                '}';
    }
}
